enc=[12, 170, 161, 170, 167, 226,  31, 229, 204,  85, 
  173, 198, 102, 193, 164,  30,  24, 238,  25,  12, 
  237, 221,  13,  73, 153]#这里放入密文
s_box=[0]*256
key="i_am_a_ctF3rr"#这里放入key
for i in range(256):
    s_box[i]=i
v6 = 0
for j in range(256):
    v6=(ord(key[j%len(key)])+v6+s_box[j])%256
    s_box[j],s_box[v6]=s_box[v6],s_box[j]
v7 = 0
v8 = 0
for k in range(len(enc)):
    v8 = (v8 + 1) % 256
    v7 = (v7 + s_box[v8]) % 256
    s_box[v8],s_box[v7]=s_box[v7],s_box[v8]
    enc[k] ^= s_box[(s_box[v7] + s_box[v8]) % 256]
print(bytes(enc))

